package com.itheima.wemedia.feign;

import com.itheima.common.vo.ResultVo;
import com.itheima.wemedia.pojo.WmNews;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "leadnews-wemedia",contextId = "wmNewsFeign")
public interface WmNewsFeign {

    /**
     * 通过文章查询id
     * @param newId
     * @return
     */
    @GetMapping("/api/wmNews/{newsId}")
    ResultVo<WmNews> getWmNewsById(@PathVariable (name = "newsId") Integer newId);


    /**
     * 修改文章状态
     * @param wmNews
     * @return
     */
    @PutMapping("/api/wmNews/update")
    ResultVo<WmNews> update(@RequestBody WmNews wmNews);




}
